<% content_for :css do %>
  <%= stylesheet_link_tag 'hot_posts_index' %>
<% end %>
<% content_for :javascript do %>
<script>
  function show_or_hide_the_last_error(link,tools_id)
  {
    if($(tools_id).style.display == '')
    {
      Effect.BlindUp(tools_id);
      link.innerHTML = '查看异常';
    }
    else
    {
      Effect.BlindDown(tools_id);
      link.innerHTML = '隐藏异常';
    }
  }
  
  function show_or_hide_zhuiers(link,tools_id)
  {
    if($(tools_id).style.display == '')
    {
      Effect.BlindUp(tools_id);
      link.innerHTML = '查看谁追';
    }
    else
    {
      Effect.BlindDown(tools_id);
      link.innerHTML = '隐藏谁追';
    }
  }

  function show_or_hide_the_lz_last_post(link,tools_id)
  {
    if($(tools_id).style.display == '')
    {
      Effect.BlindUp(tools_id);
      link.innerHTML = '查看lz新帖';
    }
    else
    {
      Effect.BlindDown(tools_id);
      link.innerHTML = '隐藏lz新帖';
    }
  }

  function show_or_hide_last_sms(link,hot_post_last_sms_id)
  {
    if($(hot_post_last_sms_id).style.display == '')
    {
      Effect.BlindUp(hot_post_last_sms_id);
      link.innerHTML = '查看短信';
    }
    else
    {
      Effect.BlindDown(hot_post_last_sms_id);
      link.innerHTML = '隐藏短信';
    }
  }

  function go_to(page_num)
  {
    $('page').value = page_num;
    searching();
  }

  function order_by(order,by)
  {
    $('order').value = order;
    $('by').value = by;
    searching();
  }

  function searching()
  {
    Try.these(function() {
      <%= remote_function :update => 'hot_post_admin',
            :url => hot_posts_url,
            :method => :get,
            :with => "Form.serialize('search_form') + '&' +  Form.serialize('search_type_form')"
      %>
    }, function() {
     <%= remote_function :update => 'hot_post_admin',
            :url => hot_posts_url,
            :method => :get,
            :with => "Form.serialize('search_form')"
      %>
    });
  }
</script>
<% end %>
<%= render :file => 'infos/_nav_bar.html' %>
<div id='hot_post_admin'>
</div>
<% form_tag 'javascript:void(0);', :id => 'search_form'  do %>
  <%= hidden_field_tag :page %>
  <%= hidden_field_tag :order %>
  <%= hidden_field_tag :by %>
<% end %>
<script>
  searching();
  <%= normal_loading('hot_post_admin',:height => '500px') %>
</script>